<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
   /*  unshift*(被添加元素)   在元素的前面加
    push（被添加元素）        在元素的后面加
   
   */
  var currentDay ="星期四";
  var dayList = [currentDay];
  dayList.unshift("星期一","星期二","星期三");
  dayList.push("星期五","星期六","星期热");
  console.log(dayList);


  // arr.concat(arr1,arr2) 
  // hui会将  arr，arr1，arr2 合并，得到一个新数组
  //但是不会对arr造成影响


  var arr1 = ["hello","world"];
  var arr2 = ["hello","Javascprit"];
  var arr3 = ["arr3"];
  var arr4 = arr1.concat(arr2,arr3);
  console.log(arr4);
    </script>
</html>